furny.states
Class SummaryPostState<T extends IIndividual<T>>

java.lang.Object
  extended by com.jme3.app.state.AbstractAppState
      extended by ga.view.appstate.RootNodeState
          extended by ga.view.appstate.SceneState
              extended by furny.states.SummaryPostState<T>
Type Parameters:
T - The generic type of the individuals.
All Implemented Interfaces:
com.jme3.app.state.AppState, IMenuListenerParent, IPostEvaluationState

public class SummaryPostState<T extends IIndividual<T>>
extends SceneState
implements IPostEvaluationState

Post state to show a summary after the evaluation.

Since:
12.08.2012
Author:
Stephan Dreyer

Nested Class Summary
private  class SummaryPostState.SummaryMouseListener
          Mouse listener that detects selection of a summary panel node.
 
Field Summary
private  ISIGA<T> algorithm
           
private  IInteractiveFitnessEvaluator<T> evaluator
           
private static int INDIVIDUAL_COUNT
           
private  MenuListener menuListener
           
private  java.util.List<PanelNode<T>> menuNodes
           
private  IPhenotypeGenerator<T,com.jme3.scene.Node> phenotypeGenerator
           
private  SummaryPostState.SummaryMouseListener summaryMouseListener
           
private  SummaryUIState<T> uiState
           
 
Fields inherited from class ga.view.appstate.SceneState
app, assetManager, cam, inputManager, renderManager, stateManager, timer, viewPort
 
Fields inherited from class ga.view.appstate.RootNodeState
rootNode
 
Fields inherited from class com.jme3.app.state.AbstractAppState
initialized
 
Constructor Summary
SummaryPostState(IInteractiveFitnessEvaluator<T> evaluator, ISIGA<T> algorithm, IPhenotypeGenerator<T,com.jme3.scene.Node> phenotypeGenerator)
          Instantiates a new summary post state.
 
Method Summary
 void cleanup()
           
private  com.jme3.collision.CollisionResults findPick(com.jme3.scene.Node node)
          Finds spatials in the scene that has been clicked.
 void initialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app)
           
 void setEnabled(boolean enabled)
           
 void setMenuListener(MenuListener menuListener)
          Sets the menu listener.
 
Methods inherited from class ga.view.appstate.SceneState
finalCleanUp, getCamera
 
Methods inherited from class ga.view.appstate.RootNodeState
getRootNode, update
 
Methods inherited from class com.jme3.app.state.AbstractAppState
isEnabled, isInitialized, postRender, render, stateAttached, stateDetached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jme3.app.state.AppState
isEnabled, isInitialized, postRender, render, stateAttached, stateDetached, update
 

Field Detail

INDIVIDUAL_COUNT

private static final int INDIVIDUAL_COUNT
See Also:
Constant Field Values

summaryMouseListener

private SummaryPostState.SummaryMouseListener summaryMouseListener

menuNodes

private final java.util.List<PanelNode<T extends IIndividual<T>>> menuNodes

phenotypeGenerator

private final IPhenotypeGenerator<T extends IIndividual<T>,com.jme3.scene.Node> phenotypeGenerator

evaluator

private final IInteractiveFitnessEvaluator<T extends IIndividual<T>> evaluator

algorithm

private final ISIGA<T extends IIndividual<T>> algorithm

menuListener

private MenuListener menuListener

uiState

private SummaryUIState<T extends IIndividual<T>> uiState
Constructor Detail

SummaryPostState

public SummaryPostState(IInteractiveFitnessEvaluator<T> evaluator,
                        ISIGA<T> algorithm,
                        IPhenotypeGenerator<T,com.jme3.scene.Node> phenotypeGenerator)
Instantiates a new summary post state.

Parameters:
evaluator - the evaluator
algorithm - the algorithm
phenotypeGenerator - the phenotype generator
Since:
12.08.2012
Method Detail

initialize

public void initialize(com.jme3.app.state.AppStateManager stateManager,
                       com.jme3.app.Application app)
Specified by:
initialize in interface com.jme3.app.state.AppState
Overrides:
initialize in class SceneState

setMenuListener

public void setMenuListener(MenuListener menuListener)
Description copied from interface: IMenuListenerParent
Sets the menu listener.

Specified by:
setMenuListener in interface IMenuListenerParent
Parameters:
menuListener - the new menu listener

findPick

private com.jme3.collision.CollisionResults findPick(com.jme3.scene.Node node)
Finds spatials in the scene that has been clicked.

Parameters:
node - The parent node to check for clicks.
Returns:
The results of the click.
Since:
12.08.2012

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface com.jme3.app.state.AppState
Overrides:
setEnabled in class SceneState

cleanup

public void cleanup()
Specified by:
cleanup in interface com.jme3.app.state.AppState
Overrides:
cleanup in class RootNodeState